package com.leyou.gateway.web;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 张伟奇
 * @Date 2021/7/11 21:31
 * @description
 * @Version 1.0
 **/
@RestController
public class FallbackController {
    /**
     * 默认超时的逻辑处理
     * @runturn超时提醒
     */
    @GetMapping(value = "/hystrix/fallback")
    public ResponseEntity<String> fallBackController(){
        return ResponseEntity.status(HttpStatus.GATEWAY_TIMEOUT).body("请求超时！");
    }
}
